static char SccsId[] = "@(#)texload.c	1.2   9/21/95";

#include <farl.h>

unsigned short  buf[163840];

void
main()
{
	int	fp, i, num;

	FX73init();
	FarlInit();
	pio_putstr( "Sprite data loading..." );
	fp = pio_fopen( "spdata.aic", "rb" );
	if ( fp == -1 ) {
		pio_putstr( "\nCannot open AIC file.\n" );
		return;
	}
	i = pio_fread( fp, 4, (char *)( &num ) );
	if ( i < 4 ) {
		pio_putstr( "\nAIC file read error.\n" );
		return;
	}
	i = pio_fread( fp, num, (char *)buf );
	if ( i < num ) {
		pio_putstr( "\nAIC file read error.\n" );
		return;
	}
	FarlSetPETextureReg( 0 );
	for ( i = 0; i < ( num / 2 ); i++ ) {
		FarlWriteFifoH( buf[i] );
	}
	pio_putstr( "done.\n" );
	return;
}
